-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(doc): problematic polling operation for lro delete #1442
base: main
Are you sure you want to change the base?
Conversation
Currently in the offical guide, the same polling operation is shared by all lro operations, which could cause problems for some emitters since the lro metadata contains value which doesn't fit for lro delete. See Azure/autorest.csharp#4827 This commit will create a separate polling operation which fits lro delete. The same definition is already available in https://github.com/Azure/typespec-azure/blob/955fc9534c2f7153d45c9fbe5743baa0c104d803/packages/samples/specs/data-plane/trait-versioning/main.tsp#L72-L77
No changes needing a change description found. |
You can try these changes here
|
docs/getstarted/azure-core/step06.md
Outdated
@@ -28,7 +33,7 @@ interface Widgets { | |||
createOrUpdateWidget is Operations.LongRunningResourceCreateOrUpdate<Widget>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl
Is it OK for us to replace this example with LongRunningResourceCreateOrReplace
?
As Azure guideline (DPG)
⛔ DO NOT implement PATCH as an LRO. If LRO update semantics are required, implement it using the LRO POST action pattern .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated according to Weidong's comment. I can roll back to previous comment if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update content below to use createOrReplace
as well?
1. We change `createOrUpdateWidget` to use `LongRunningResourceCreateOrUpdate<Widget>` and `deleteWidget` to use `LongRunningResourceDelete`. |
Currently in the offical guide, the same polling operation is shared by all lro operations, which could cause problems for some emitters since the lro metadata contains value which doesn't fit for lro delete. See Azure/autorest.csharp#4827
This commit will create a separate polling operation which fits lro delete. The same definition is already available in
typespec-azure/packages/samples/specs/data-plane/trait-versioning/main.tsp
Lines 72 to 77 in 955fc95